package org.greatlogic.gwtfilereaderwidget.client.itunes;

import com.google.gwt.xml.client.Element;
import java.util.TreeMap;
import org.greatlogic.gwtfilereaderwidget.client.itunes.ITunesEnums.ETrackKeyType;

interface IHasKeyAndValueEntries {
//--------------------------------------------------------------------------------------------------
void addKeyAndValueEntry(final KeyAndValueEntry keyAndValueEntry);
/**
 * Returns the KeyAndValueEntry that corresponds with the requested key type.
 * @param keyType The key type that is used to find the key and value entry.
 * @return The KeyAndValueEntry that corresponds with the requested key type. If there is no entry
 * for the request type then an empty KeyAndValueEntry object is returned.
 */
KeyAndValueEntry getKeyAndValueEntry(final ETrackKeyType keyType);
TreeMap<ETrackKeyType, KeyAndValueEntry> getKeyAndValueEntryMap();
/**
 * Processes a node for a key that uses an "array" for its associated data.
 * @param keyType The key type for this data (e.g., PlaylistItems).
 * @param arrayElement The element with the tag "array".
 * @return Returns true if the element was processed.
 */
boolean processArray(final ETrackKeyType keyType, final Element arrayElement) throws ITunesException;
//--------------------------------------------------------------------------------------------------
}